<?php
session_start();
include_once "conn.php";
$contents = $_POST['contents'];
$maintopicid = $_POST['maintopicid'];
$quoteid = $_POST['quoteid'];
$reply = new Bbs();
$result = $reply ->reply($maintopicid,$contents,$quoteid);
if($result['error']){
    $a['error'] = 1;
    $a['errMsg'] = $result['errMsg'];
}
else{
    $a['error'] = 0;
    $a['rowCount'] = $result['rowCount'];
}
echo json_encode($a);